<?php

require __DIR__ . '/protected/zhuli/core/Loader.php';

//实例化自动加载类
$loader = new \zhuli\core\Loader();

//注册自动加载函数
spl_autoload_register([$loader,'load']);

//添加映射关系
$loader->addPsr4('zhuli\\', __DIR__ . '/protected/zhuli');
$loader->addPsr4('zhuli\\guestbook\\', __DIR__ . '/protected/guestbook');
print_r($loader);

$request = new \zhuli\web\Request();
$response = new \zhuli\web\Response();
$view = new \zhuli\web\View();

$application = new \zhuli\web\Application($request, $response, $view);

$application->setControllerNamespace('zhuli\\guestbook\\controller');
$application->run();

